package com.ordertracker.persistent.dictionary.template;

import javax.persistence.*;

import com.ordertracker.persistent.dictionary.AuditEntity;
import com.ordertracker.persistent.dictionary.IOrganization;

/**
 * Description of class.
 * Created 12/13/12 3:34 PM
 *
 * @author andrey.rodin@playtech.com
 */

@MappedSuperclass
public abstract class AbstractOrganizationTemplate extends StateEntityTemplate implements IOrganization {

    @Column
    private String shortName;
    @Column
    private String fullName;
    @Column
    private String prefix;
    @Column
    private String description;
    @Column(nullable = false, unique = true)
    private int code;

    @Embedded
    private AuditEntity auditField;


    protected AbstractOrganizationTemplate() {
    }

    protected AbstractOrganizationTemplate(String shortName, String prefix) {
        this.shortName = shortName;
        this.prefix = prefix;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getShortName() {
        return shortName;
    }

    public String getFullName() {
        return fullName;
    }

    public String getPrefix() {
        return prefix;
    }
    
    public String getDescription() {
        return description;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public AuditEntity getAuditField() {
        return auditField;
    }

    public void setAuditField(AuditEntity auditField) {
        this.auditField = auditField;
    }


}
